package com.github.hwangrq.minicat.container;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hwangrq
 * @date 2021/3/17 18:48
 * @description
 */
public class Server {

    // Server 里的 Service
    private Map<String, Mapper> serviceMap = new HashMap<>();

    public Server() {
    }

    public Server(Map<String, Mapper> serviceMap) {
        this.serviceMap = serviceMap;
    }

    public Map<String, Mapper> getServiceMap() {
        return serviceMap;
    }

    public void setServiceMap(Map<String, Mapper> serviceMap) {
        this.serviceMap = serviceMap;
    }

    public void putService(String serviceName, Mapper mapper) {
        serviceMap.put(serviceName, mapper);
    }
}
